﻿@model IEnumerable<CloudFranceTriple.Models.webpages_Roles>
@{
    ViewBag.Title = String.Format("{0} - {1}", CloudFranceTriple.WebRole.Properties.Resources.UserRolesTitle, ViewBag.UserName);
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="content-padding">
    <h1>@CloudFranceTriple.WebRole.Properties.Resources.UserRolesTitle - @ViewBag.UserName</h1>
    <section>
        <table>
            <tr>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.SecurityRoleName
                </th>
                <th></th>
            </tr>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.RoleName)
                    </td>
                    <td>
                        @Html.ActionLink(@CloudFranceTriple.WebRole.Properties.Resources.UserRolesButtonUnlink, "Unlink", "UserRoles", new { id = ViewBag.UserId as int?, id2 = item.RoleId as int?, area = "UserManager" }, null)
                    </td>
                </tr>
            }
        </table>
    </section>
    @{if (ViewBag.ShowLinkRole)
      {
        <section>
            @using (Html.BeginForm())
            {
                @Html.ValidationSummary(true)
                <fieldset>
                    <legend>Role</legend>

                    <div class="editor-field">
                        @Html.DropDownList("Role_Id", String.Empty)
                        <input type="submit" value="@CloudFranceTriple.WebRole.Properties.Resources.UserRolesButtonLink" />
                    </div>
                </fieldset>
            }
        </section>
      }
    }
    <br />
    @Html.Partial("_UserBackToList")
</div>
